package my.interview;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @DESCRIPTION:
 * @USER: shg
 * @DATE: 2022/12/27 19:50
 */
public class HJ14 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = Integer.parseInt(scanner.nextLine());
        String[] arrStr = new String[num];
        for (int i = 0; i < num; i++) {
            arrStr[i] = scanner.nextLine();
        }
        Arrays.sort(arrStr);
        for (int i = 0; i < num; i++) {
            System.out.println(arrStr[i]);
        }
    }
}
